// --------------------------------------------------------------------------------------------------------------------

// <copyright file="UsedImplicitlyAttribute.cs" company="Social Development Spb">

//   Copyright (c) Social Development Spb 2009

// </copyright>

// <summary>

//   Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library),

//   so this symbol will not be marked as unused (as well as by other usage inspections).

// </summary>

// --------------------------------------------------------------------------------------------------------------------


using System;

namespace Diagnostics.Annotations
{
    #region Imported Namespaces

    

    #endregion


    /// <summary>
    /// Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library),
    /// so this symbol will not be marked as unused (as well as by other usage inspections).
    /// </summary>
    [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
    public sealed class UsedImplicitlyAttribute : Attribute
    {
        #region Constructors and Destructors


        /// <summary>
        /// Initializes a new instance of the <see cref="UsedImplicitlyAttribute"/> class.
        /// </summary>
        public UsedImplicitlyAttribute()
            : this(ImplicitUseFlags.Default)
        {
        }


        /// <summary>
        /// Initializes a new instance of the <see cref="UsedImplicitlyAttribute"/> class.
        /// </summary>
        /// <param name="flags">Value of type <see cref="ImplicitUseFlags"/> indicating usage kind.</param>
        public UsedImplicitlyAttribute(ImplicitUseFlags flags)
        {
            Flags = flags;
        }

        #endregion


        #region Properties

        /// <summary>
        /// Gets value indicating what is meant to be used.
        /// </summary>
        /// <value>A value indicating what is meant to be used.</value>
        [UsedImplicitly]
        public ImplicitUseFlags Flags
        {
            get;
            private set;
        }

        #endregion
    }
}